package io.renren.entity;

import org.apache.commons.lang.StringUtils;

public class ClassEntity {

 /** 主包根目录,eg:top.suven**/
    private String tables;
    /**包目录,eg: top.suven.modules **/
    private String mainPath;
    /** package, 包目录 **/
    private String packagePath;
    /** moduleName,模块名称,eg:generator **/
    private String moduleName;
    /** author,作者名,eg:suven**/
    private String author;
    /** 邮箱,eg:suvenw@gmail.com**/
    private String email;
    /** 删除表前缀,eg:tb_ **/
    private String tablePrefix;

    public static ClassEntity build(){
        return new ClassEntity();
    }


    public String getTables() {
        if(null == tables){
            return "";
        }
        return tables;
    }

    public ClassEntity setTables(Object tables) {
        if(tables == null){return this;}
        this.tables = tables.toString();
        return this;
    }
    public String getMainPath() {
        mainPath = StringUtils.isBlank(mainPath) ? "top.suven" : mainPath;
        return mainPath;
    }

    public ClassEntity setMainPath(Object mainPath) {
        if(mainPath == null){
            return this;}
        this.mainPath = mainPath.toString();
        return this;
    }

    public String getPackagePath() {
        return packagePath;
    }

    public ClassEntity setPackagePath(Object packagePath) {
        if(packagePath == null){return this;}
        this.packagePath = packagePath.toString();
        return this;
    }

    public String getModuleName() {
        return moduleName;
    }

    public ClassEntity setModuleName(Object moduleName) {
        if(moduleName == null){return this;}
        this.moduleName = moduleName.toString();
        return this;
    }

    public String getAuthor() {
        return author;
    }

    public ClassEntity setAuthor(Object author) {
        if(author == null){return this;}
        this.author = author.toString();
        return this;
    }

    public String getEmail() {
        return email;
    }

    public ClassEntity setEmail(Object email) {
        if(email == null){return this;}
        this.email = email.toString();
        return this;
    }

    public String getTablePrefix() {
        return tablePrefix;
    }

    public ClassEntity setTablePrefix(Object tablePrefix) {
        if(tablePrefix == null){return this;}
        this.tablePrefix = tablePrefix.toString();
        return this;
    }


}
